package cn.wzy.client;

import cn.wzy.domain.LoginUser;
import cn.wzy.util.AjaxResult;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class AuthClientFallbackFactory implements FallbackFactory<AuthClient> {

    @Override
    public AuthClient create(Throwable throwable) {
        return new AuthClient() {
            @Override
            public AjaxResult addOrUpdate(LoginUser loginUser) {
                System.out.println(throwable.toString());
                return null;
            }
        };
    }
}
